🎯Подвох: - Решение работает без глобальных переменных - Используется поведение изменяемых аргументов по умолчанию - Это поведение часто становится причиной багов у новичков — но здесь оно работает на нас
🧠Объяснение подвоха: - Аргумент cache=[] вычисляется один раз, при первом вызове функции - Все последующие вызовы используют один и тот же список - Обычно это считается "ловушкой", но в задачах на замыкание состояния — это полезный трюк
⚠️ Не путай: если внутри функции ты напишешь cache = [], то всё сломается — потому что создастся новый список каждый раз
🎯Подвох: - Решение работает без глобальных переменных - Используется поведение изменяемых аргументов по умолчанию - Это поведение часто становится причиной багов у новичков — но здесь оно работает на нас
🧠Объяснение подвоха: - Аргумент cache=[] вычисляется один раз, при первом вызове функции - Все последующие вызовы используют один и тот же список - Обычно это считается "ловушкой", но в задачах на замыкание состояния — это полезный трюк
⚠️ Не путай: если внутри функции ты напишешь cache = [], то всё сломается — потому что создастся новый список каждый раз
BY Python tests
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”
The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.